import 'package:flutter/material.dart';
class Classroom extends StatefulWidget {
  @override
  _ClassroomState createState() => _ClassroomState();
}

class _ClassroomState extends State<Classroom> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar:AppBar(
        backgroundColor: Colors.white,
        automaticallyImplyLeading: false,
        leading: IconButton(icon:Icon(Icons.menu,color: Colors.black) , onPressed: null),
        title: Text('Google Classroom',style:TextStyle(color:Colors.black,fontSize: 25,fontWeight: FontWeight.w400)),
        actions: <Widget>[
          IconButton(icon: Icon(Icons.add,color: Colors.black), onPressed: null),
          IconButton(icon: Icon(Icons.more_vert,color: Colors.black), onPressed: null),
        ],
      ),
      body:ListView(        
        children: <Widget>[
          MyCard(imgurl:'images/a1.jpg',title1: 'Social Studies',title2: 'Period 2',text1: 'George Reis',),
          MyCard(imgurl:'images/a2.jpg',title1: 'Algebra 2',title2: 'Period 6',text1: 'Zach Yeskel',),        
          MyCard(imgurl:'images/a3.jpg',title1: 'Physical Education',title2: 'Period 4',text1: 'Justine Tiu',),
          MyCard(imgurl:'images/a4.jpg',title1: 'Astronomy',title2: 'Period 5',text1: 'Molly Mackinlay',),
          MyCard(imgurl:'images/a5.jpg',title1: 'Algebra 2',title2: 'Period 6',text1: 'Zach Yeskel',),
                  
    
        ],
      ) ,
    );
  }
}
class MyCard extends StatelessWidget {
  String imgurl;
  String title1,title2,text1;
  MyCard({this.imgurl,this.title1,this.title2,this.text1});
  @override
  Widget build(BuildContext context) {
    return Stack(
            children: <Widget>[
              Container(
                margin: EdgeInsets.fromLTRB(16,10,16,0),
                height: 155,
                width: 500,                                
                decoration: BoxDecoration(                  
                  borderRadius: BorderRadius.circular(10),
                  image: DecorationImage(image: AssetImage('$imgurl'),fit: BoxFit.fill)
                  ),
              ),
              Card(
                margin: EdgeInsets.fromLTRB(16,5,16,0),
                color: Color.fromARGB(0, 255, 255, 255),
                elevation: 0,                
                child: Column(
                  children: <Widget>[
                    SizedBox(height: 10,),                    
                    Row(
                      mainAxisAlignment: MainAxisAlignment.start,
                      children: <Widget>[                        
                        Container(
                          color: Color.fromARGB(0, 255, 255, 255),
                          width:350 ,
                          height: 70,
                          child:ListTile(
                          title:Text('$title1',style: TextStyle(color: Colors.white,fontSize: 25),),
                          subtitle: Text('$title2',style: TextStyle(color: Colors.white,fontSize: 15,fontWeight: FontWeight.w500)),
                          ),                          
                        ),
                        SizedBox(width: 20,),
                        IconButton(icon: Icon(Icons.more_vert,color: Colors.white), onPressed: null)
                        
                        //IconButton(icon: Icon(Icons.more_vert,color: Colors.black), onPressed: null)
                      ],
                    ), 
                    SizedBox(height: 10,),
                    ListTile(                      
                      subtitle: Text('$text1',style: TextStyle(color: Colors.white,fontSize: 13,fontWeight: FontWeight.w400)),
                      ),],
                ),
                
              )
            ],
          );        
  }
}